import Vue from 'vue'
import VueRouter from 'vue-router'
import layout from '@/layout'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: layout,
    redirect: '/dbs',
    children: [
      {
        path: '/dbs', component: () => import('@/views/home/dasb')
      }
    ]
  },
  {
    path: '/user',
    component: layout,
    redirect: '/user/list',
    children: [
      { path: '/user/list', component: () => import('@/views/user/list') }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login'),
    name: 'login'
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes

})

export default router
